package com.vcredit.creditcat.enumtype.product.h5;


public enum LoanOrderStatusEnum {
	
	LoanApplying(1, 8, "放款审核中"),
	LoanApplyNoPass(2, 9, "放款审核未通过"),
	LoanApplyPass(3, 10, "放款审核通过"),
	Reoayment(4, 11, "还款中"),
	Expired(5, 12, "还款逾期中"),
	End(6, 13, "已结清");

	private Integer orderStatus;
	
	private Integer auditResult;
	
	private String desc;

	private LoanOrderStatusEnum(Integer orderStatus, Integer auditResult, String desc) {
		this.orderStatus = orderStatus;
		this.auditResult = auditResult;
		this.desc = desc;
	}

	public Integer getOrderStatus() {
		return orderStatus;
	}

	public Integer getAuditResult() {
		return auditResult;
	}

	public String getDesc() {
		return desc;
	}
	
	public static Integer getAuditResultByOrderStatus(Integer orderStatus) {
		LoanOrderStatusEnum[] loanOrderStatusEnums = LoanOrderStatusEnum.values();
		for (LoanOrderStatusEnum loanOrderStatusEnum : loanOrderStatusEnums) {
			if(loanOrderStatusEnum.getOrderStatus().intValue() == orderStatus) {
				return loanOrderStatusEnum.getAuditResult();
			}
		}
		
		return null;
	}
}
